package com.icepeach.icepeachhomeback.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.icepeach.icepeachhomeback.dto.BindUserRoleDto;
import com.icepeach.icepeachhomeback.dto.RoleDto;
import com.icepeach.icepeachhomeback.entity.Role;
import com.icepeach.icepeachhomeback.req.RoleListQueryReq;
import com.icepeach.icepeachhomeback.util.ApiResult;

import java.util.List;

/**
* @author 24273
* @description 针对表【role】的数据库操作Service
* @createDate 2023-05-03 21:22:36
*/
public interface RoleService extends IService<Role> {
    /**
     *
     * @param roleListQueryReq
     * @return
     */
    IPage<Role> getRolesByPage(RoleListQueryReq roleListQueryReq);

    ApiResult mySaveOrUpdate(Role role);

    ApiResult assignRole(BindUserRoleDto bindUserRoleDto);

    ApiResult removeRole(BindUserRoleDto bindUserRoleDto);

    ApiResult<List<Role>> unBindRoleList(String userId);

    ApiResult bindRoleList(String userId);
}
